package org.tooyoung.fourone.live.models;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Administrator on 2016/11/7.
 */

public class Room implements Parcelable{

    /**
     * roomid : 939808
     * id : 1430942
     * identity : 1006
     * nickname : 黎唯一
     * roomtype : 0
     * headimg : http://imgs.163888.net/fenbei/head/20161024/1430942_124716_357.jpg
     * subject : 不是好声音，才有好声音
     * playnum : 122
     * roomstatus : 1
     * url : http://pull.163888.net/live/939808.flv
     * city : 哈尔滨市
     */
    @SerializedName("roomid")
    private long roomid;
    @SerializedName("id")
    private long id;
    @SerializedName("identity")
    private long identity;
    @SerializedName("nickname")
    private String nickname;
    @SerializedName("roomtype")
    private long roomtype;
    @SerializedName("headimg")
    private String headimg;
    @SerializedName("subject")
    private String subject;
    @SerializedName("playnum")
    private long playnum;
    @SerializedName("roomstatus")
    private long roomstatus;
    @SerializedName("url")
    private String url;
    @SerializedName("city")
    private String city;
    private String lat;
    private String lng;

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    protected Room(Parcel in) {
        roomid = in.readLong();
        id = in.readLong();
        identity = in.readLong();
        nickname = in.readString();
        roomtype = in.readLong();
        headimg = in.readString();
        subject = in.readString();
        playnum = in.readLong();
        roomstatus = in.readLong();
        url = in.readString();
        city = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(roomid);
        dest.writeLong(id);
        dest.writeLong(identity);
        dest.writeString(nickname);
        dest.writeLong(roomtype);
        dest.writeString(headimg);
        dest.writeString(subject);
        dest.writeLong(playnum);
        dest.writeLong(roomstatus);
        dest.writeString(url);
        dest.writeString(city);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Room> CREATOR = new Creator<Room>() {
        @Override
        public Room createFromParcel(Parcel in) {
            return new Room(in);
        }

        @Override
        public Room[] newArray(int size) {
            return new Room[size];
        }
    };

    public long getRoomid() {
        return roomid;
    }

    public void setRoomid(long roomid) {
        this.roomid = roomid;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getIdentity() {
        return identity;
    }

    public void setIdentity(long identity) {
        this.identity = identity;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public long getRoomtype() {
        return roomtype;
    }

    public void setRoomtype(long roomtype) {
        this.roomtype = roomtype;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public long getPlaynum() {
        return playnum;
    }

    public void setPlaynum(long playnum) {
        this.playnum = playnum;
    }

    public long getRoomstatus() {
        return roomstatus;
    }

    public void setRoomstatus(long roomstatus) {
        this.roomstatus = roomstatus;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Override
    public String toString() {
        return "Room{" +
                "roomid=" + roomid +
                ", id=" + id +
                ", identity=" + identity +
                ", nickname='" + nickname + '\'' +
                ", roomtype=" + roomtype +
                ", headimg='" + headimg + '\'' +
                ", subject='" + subject + '\'' +
                ", playnum=" + playnum +
                ", roomstatus=" + roomstatus +
                ", url='" + url + '\'' +
                ", city='" + city + '\'' +
                ", lat='" + lat + '\'' +
                ", lng='" + lng + '\'' +
                '}';
    }
}
